package cn.dt70.controller;

import cn.dt70.pojo.AqbGrowth;
import cn.dt70.service.AqbGrowthService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/growth/")
public class GrowthController {
    
    @Resource
    private AqbGrowthService aqbGrowthService;

    @RequestMapping("growthlist")
    public String growthList(@RequestParam(value = "userid",required = false) String userCode,
                             Model model){
        userCode = "test001";
        AqbGrowth growthById = aqbGrowthService.getGrowthByUserCode(userCode);

        model.addAttribute("growthById",growthById);
        return "usercenter-growth-index";
    }
}
